interface Shape{
    area():number
}

class Rect implements Shape{
    constructor(private x:number, private y:number){
        // 这是接口，不是继承，所以不要写super()
    }
    area():number {
        return this.x * this.y;
    }
}

let a:Shape;

a = new Rect(100, 200);
console.log(a.area());
